import {customeStruct} from '../utils';
const itf = customeStruct.interface;

export const InitDataStruct = itf({
    payload: itf({
        brands: [itf(Object.assign({
            id: 'string',
            code: 'string',
            name: 'string',
        }))],
        isDealerUser: 'boolean',
    })
});

const content = {
    id: 'string',
    brandId: 'string',
    brandCode: 'string',
    brandName: 'string? | null',
    isWorkingDay: 'boolean',
    day: 'datetime? | null',
    rowVersion: 'string',
    options: ['string']
};

export const List = itf({
    payload: itf({
        content: [itf(Object.assign(content))]
    })
});

export const Detail = itf({
    payload: itf({
        id: 'string',
        brandId: 'string',
        brandCode: 'string',
        brandName: 'string? | null',
        isWorkingDay: 'boolean',
        day: 'datetime? | null',
        rowVersion: 'string',
        options: ['string']
    })
});
